/* =========================================================
   ROOT FONT SIZE (10px base)
   ========================================================= */
html {
  font-size: 62.5%; /* 1rem = 10px */
}

:root {
  --nav-bar-color: #a43f3f;
  --background-color: #f7f7f7;
  --popover-background-color: #7ef19b;
  --arrow-NO-hover-color: var(--nav-bar-color);
  --arrow-hover-color: #2f5d3a;
}
/* ================================
   GLOBAL RESETS  Recommended by https://www.youtube.com/watch?v=w4dL_8-kVEs&t=1021s time:13:00  for all files
================================ */
/* =========================================================
   GLOBAL RESETS
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial;
}

body {
  background-color: var(--background-color);
  font-size: 1.75rem;
  text-align: center;
}

/* =========================================================
    Site Variables  
========================================================= */

/* =========================================================
   HEADER & LOGO
   ========================================================= */
header {
  background: var(--background-color);
}
header::after {
  content: "";
  display: table;
  clear: both;
}

.site-logo {
  display: block;
  margin: 1rem auto;
  width: 100rem;
  max-width: 100%;
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2),
    0 0.6rem 2rem rgba(0, 0, 0, 0.19);
}
.page_wrapper {
  width: 80%;
  margin: 0 auto;
}
.center_wrapper {
  display: flex;
  justify-content: center;
}
.container {
  width: 100%;
  margin: 0 auto;
}

.in-a-bit {
  width: 100%;
  max-width: 700px;
  /* &.w90 {
    width: 90%;
  }
  &.w50 {
    width: 50%;
  }
  &.w80 {
    width: 80%;
  } */
  margin: 0 auto;
}

.nav_logo {
  margin: 0.5rem;
  float: left;
  height: 2.5rem;
  width: auto;
  color: white;
}

/* =========================================================
   FOOTER
   ========================================================= */
.FSLine1 {
  width: 250px;
  height: auto;
}
.FSLine2 {
  width: 250px;
  height: auto;
}

.copyright-footer {
  font-size: 1.5rem;
  color: #666;
  line-height: 1.4;
  margin: 0rem 3rem;
  text-align: left;
}
.copyright-footer-line {
  font-size: 1.5rem;
  color: #666;
  line-height: 1.4;
  margin: 0 auto 1rem auto;
  text-align: center;
}
/* =========================================================
   HOME BUTTON
   ========================================================= */
.home-button {
  background-color: #f7f7f7;
  color: #a43f3f;
  padding: 0.6rem 1.4rem;
  border-radius: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  border: 0.1rem solid #ccc;
  transition: 0.2s;
  box-shadow: 0 0.4rem 0.8rem 0.5rem rgba(0, 0, 0, 0.2),
    0 0.6rem 2rem rgba(0, 0, 0, 0.19);
}
.home-button:hover {
  background-color: #444;
  color: gold;
  border-color: #333;
}

/* =========================================================
   NAVIGATION BAR
   ========================================================= */
#nav_menu {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}
.nav_bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  margin: 0 auto;
  background-color: var(--nav-bar-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  height: 70px; /* precise px kept */
}

.nav_bar > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4rem;
  margin-left: auto;
}

.nav_bar ul li a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: white;
  text-decoration: none;
  padding: 0.8rem 0.4rem;
  line-height: 1.2;
  margin-left: auto;
}

.nav_bar ul li a:hover {
  color: gold;
}

/* =========================================================
   DROPDOWNS
   ========================================================= */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  padding-top: 0;
  background-color: #333;
  min-width: 16rem;
  list-style: none;

  & li {
    margin: 0;
    border-bottom: 2px solid var(--nav-bar-color);

    &:last-child {
      border-bottom: none;
    }
  }

  & a {
    padding: 1rem 1.4rem;
    color: white;
    text-decoration: none;
  }

  & a:hover {
    background-color: #444;
  }
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* =========================================================
   HAMBURGER (Desktop hidden)
   ========================================================= */
.hamburger {
  display: none;
}

/* =========================================================
   TEXT / SCRIPTURE SECTIONS
   ========================================================= */
.div_discussion {
  font-size: 2rem;
  margin: 2rem auto;
  max-width: 80%;
  text-align: center;
}
.div_justified {
  font-size: 2rem;
  padding: 0px 15px;
  text-align: left;
  max-width: 800px; /* 👈 controls how narrow the block is */
  margin: 0 auto; /* 👈 centers it within center_wrapper */

  &.shrink {
    width: fit-content;
    /* min-width: 2px; */
    max-width: 100%;
    margin: 0 auto;
    text-align: left;

    & ol {
      padding-left: 1.5rem;
      margin: 1.5rem 0 0 0;
      width: auto;
    }
  }
}
.div_justified ol {
  width: 90%;
  margin: 2rem auto;
}

/* Arrows for scrolling the cards */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--nav-bar-color);
  color: white;
  border: none;
  cursor: pointer;
  z-index: 1001;

  /* Responsive */
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  padding: clamp(0.4rem, 1vw, 0.7rem);
  border-radius: 0.6rem;
}

.left-arrow {
  left: 0rem;
}

.right-arrow {
  right: 0rem;
}

.nav-arrow.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Desktop polish */
@media (hover: hover) {
  .nav-arrow:hover {
    background: rgba(0, 0, 0, 0.65);
    background: var(--arrow-hover-color);
  }
}
/* FINISHED arrows for scrolling the cards */

.scripture-inset {
  text-align: left;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.scripture-inset .verse {
  margin: 0 0 0.4rem;
}

.scripture-inset p.ref {
  margin: 0 0 1rem;
  text-align: left;
  font-style: italic;
  font-size: 0.95rem;
  color: #333;
}

.text_ital {
  font-style: italic;
}

.discussion-block {
  padding: 6rem 2rem 4rem 2rem;
}

.def_esthetics {
  text-decoration: underline;
  color: red;
  cursor: pointer;
}
.def_esthetics::after {
  content: "";
  color: inherit;
}

.verse-ref {
  white-space: nowrap;
}

ul {
  margin: 1rem auto;

  & li {
    margin-top: 0.75rem;
  }
  &.a {
    list-style-type: circle;
  }
  &.b {
    list-style-type: disc;
  }
  &.c {
    list-style-type: square;
  }
}
ol {
  margin: 1rem auto;
  & li {
    margin-top: 0.75rem;
  }
}

/* =========================================================
   POPOVER
   ========================================================= */
.popover_style {
  position: absolute;
  display: none;
  padding: 1rem 1.4rem;
  border-radius: 0.8rem;
  background: var(--popover-background-color);
  border: 0.1rem solid #ccc;
  box-shadow: 0 0.2rem 0.8rem rgba(131, 227, 154, 0.2);
  font-size: 1.5rem;
  max-width: 25rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}
.popover_style.active-popover {
  opacity: 1;
}

.popover_style:hover {
  cursor: pointer; /* changes cursor when hovering */
}

/* =========================================================
   VERSE COMPARISON BLOCK
   ========================================================= */
.vc-scroll-box {
  position: sticky;
  top: 70px; /* precise px kept */
  z-index: 5000;
  background: #ffffff;
  padding: 1rem 0;
  width: max(650px, 85%);
  margin: 1rem auto 0 auto;
  border: 0.2rem solid #ddd;
  border-radius: 1rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.vc-scroll {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 2rem;
  padding: 0 1rem;
  scrollbar-width: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 1rem;
  scroll-padding-right: 1rem;
}

.verse-compare {
  flex: 0 0 55rem;
  background: #f9f9f9;
  border: 0.2rem solid #ccc;
  border-radius: 1.2rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 32rem;
  max-width: 55rem;
}
.verse-compare.selected {
  border: 2px solid #a43f3f; /* your main red color */
  border-radius: 8px;
  background-color: rgba(164, 63, 63, 0.1); /* subtle red tint */
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); /* optional soft shadow */
}

.verse-compare-noscroll {
  width: 90%;
  margin: 2rem auto 1rem auto;
  padding: 1rem;
  border: 0.2rem solid #000;
  border-radius: 1.2rem;
  background: white;
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.15);

  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 0 0 auto;
  min-width: 32rem;
  max-width: 55rem;
}

.vc-top {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.vc-item {
  width: 45%;
}

.vc-or {
  font-weight: bold;
  font-size: 1.5rem;
  padding: 1rem;
}

.vc-bottom {
  margin-top: auto;
  padding-top: 1.5rem;
  font-weight: bold;
  font-size: 1.7rem;
}

/*
===============
Placing text and image side-by-side
===============
*/
.image-text-container {
  display: flex; /* Turns the container into a flex container */
  width: 90%;
  align-items: center; /* Aligns items to the middle */
  gap: 20px; /* Adds space between image and text */
  max-width: 1000px; /* Example container width */
  margin-bottom: 5px;
}
.image-left-flex {
  width: 200px; /* Example width */
  flex-shrink: 0; /* Prevents image from shrinking */
  display: block;
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2),
    0 0.6rem 2rem rgba(0, 0, 0, 0.19);
}
/* flips image to the right */
.image-right {
  flex-direction: row-reverse;
  margin-left: auto;
}
.text-content {
  flex-grow: 1; /* Allows text to take remaining space */
}
/*  END  of Text and Image  */

/* =========================================================
Video clips
========================================================= */

/* Thumbnail */
#vid-clip-thumb {
  width: 200px;
  height: auto;
  cursor: pointer;
}

/* Video */
#vid-clip-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
  z-index: 9999;
}
/* Video inside modal */
#vid-clip-clip {
  width: min(80vw, 960px);
  aspect-ratio: 16 / 9;
  background: black;
}
/* Active state */
#vid-clip-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   YOUTUBE BLOCKS
   ========================================================= */
.video-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.video-block img {
  width: 20rem;
  height: auto;
  border-radius: 0.8rem;
}

.video-block img:hover {
  transform: scale(1.03);
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.4);
}

.video-text {
  max-width: 50rem;
  text-align: center;
}

.side-videos {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.PO_button {
  margin-bottom: 0.3rem;
  padding: 0.5rem 2rem;
  font-size: 1.5rem;
  background-color: #3d5dc6;
  color: white;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  z-index: 1000;
}

.PO_button:hover {
  background-color: #0e19a9;
}

.PO_button_texty {
  margin-bottom: 0.3rem;
  padding: 0rem 0rem;
  font-size: 1.75rem;
  background-color: var(--background-color);
  color: firebrick;
  text-decoration: underline;
  border: none;
  border-radius: 0rem;
  cursor: pointer;
  z-index: 9999;
}

/* =========================================================
   TOOLTIPS
   ========================================================= */
.tip {
  position: relative;
}
.tip span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(25, 95, 160);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  font-size: 1rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
  top: 110%;
}
.tip:hover span {
  opacity: 1;
}

/* =========================================================
   RESPONSIVE — ALL BREAKPOINTS BELOW
   ========================================================= */

/* ---------- 800px (mobile nav, hamburger, dropdown tap logic) ---------- */
@media (max-width: 800px) {
  .nav_bar {
    height: auto;
    padding: 1rem 2rem;
    flex-wrap: wrap;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
  }

  .hamburger span {
    width: 3rem;
    height: 0.4rem;
    background: white;
    border-radius: 0.2rem;
    transition: 0.3s;
  }

  #nav_menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    gap: 0rem;
    & li {
      border-bottom: 2px solid black;

      &:last-child {
        border-bottom: none;
      }
    }
  }
  #nav_menu.active {
    display: flex;
  }

  .dropdown-content {
    position: static;
    background-color: #444;
    margin-top: 0.5rem;
  }

  .dropdown:hover .dropdown-content {
    display: none;
  }

  .dropdown.open .dropdown-content {
    display: block !important;
  }

  /* Move Pics/text to top/bottom in R&J */
  .image-text-container {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 14px;
  }

  .image-left-flex {
    width: 100%;
    max-width: 360px; /* keeps image from exploding */
    margin: 0 auto;
  }

  .text-content {
    width: 100%;
  }

  .image-right {
    margin-left: 0;
  }

  .vc-scroll-box {
    width: 100%;
  }

  /* This is to stagger the image-text blocks in R&J
     It may need to go in the phone width block */
  .image-text-group {
    display: flex;
    width: 100%;
    margin-bottom: 0rem; /* controls group separation */
  }

  .image-text-group.left {
    justify-content: flex-start;
  }

  .image-text-group.right {
    justify-content: flex-end;
  }
}

/* ---------- 650px (verse comparison stack) ---------- */
@media (max-width: 650px) {
  .page_wrapper {
    width: 90%;
    margin: 0 auto;
  }
  h2 {
    font-size: 2rem;
  }
  .video-block img {
    width: 15rem;
    height: auto;
    border-radius: 0.8rem;
  }
  #vid-clip-thumb {
    width: 15rem;
    height: auto;
    cursor: pointer;
  }

  .verse-compare {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    min-width: 100%;
    max-width: none; /* ← THIS is critical */
    box-sizing: border-box;
    justify-content: flex-start;
  }
  .vc-top {
    flex: unset;
    flex-direction: column;
    align-items: center;
    gap: 1px;
  }
  .vc-bottom {
    flex: unset;
  }
  .vc-or {
    width: auto;
    font-size: 2rem;
    line-height: 1.2;
    margin: 0.25rem 0;
  }
  .vc-item {
    max-width: none;
    width: 100%;
    text-align: center;
  }

  .vc-scroll-box {
    top: 60px;
    width: 95%;
    padding-left: 1rem;
    padding-right: 1rem;

    & h2 {
      font-size: 1.75rem; /* try 1rem–1.2rem */
      line-height: 1.3;
      margin-bottom: 8px;
    } /* precise px kept */
  }

  .nav-arrow:hover {
    background: rgba(0, 0, 0, 0.65);
    background: var(--arrow-NO-hover-color);
  }

  /* Further refinement for R&J */
  .image-text-container {
    display: flex;
    width: 80%;
    align-items: center;
    gap: 10px;
    max-width: 1000px;
    margin-bottom: 5rem; /* ← group separation */
  }

  .image-left-flex {
    max-width: 300px;
  }
}

/* =========================
   Verse Comparison Modal
   Mobile-first overrides
   ========================= */
/* Modal - hidden by default */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 0.25rem;
  border-radius: 1rem;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
  position: relative;
  z-index: 10000;

  & h2 {
    padding-top: 0px;
    border-bottom: 4px solid #ccc; /* light gray line */
    padding-bottom: 0.25rem; /* small space between text and line */
    margin-bottom: 0.5rem; /* space between line and discussion */
  }
}
.vc-scroll-box,
.vc-scroll {
  z-index: 1;
}

.close-btn {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
}
/* Making discussion fade in and out */
/* Base modal (hidden) */
#discussion-modal {
  display: flex; /* keep flex for centering */
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0); /* fully transparent initially */
  opacity: 0;
  pointer-events: none; /* disable clicks when hidden */
  transition: background-color 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  padding-top: 0vh;

  & .modal-discussion {
    background: white;
    border-radius: 0.5rem;
    max-width: 90%;
    margin: 2rem auto;
    padding: 0rem;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
  }

  &.show {
    background-color: rgba(0, 0, 0, 0.5); /* dim background */
    opacity: 1;
    pointer-events: auto; /* enable interaction */

    & .modal-discussion {
      transform: translateY(0); /* slide in slightly */
    }
  }
}
